package com.tju.welding.utils;

public enum Code {
    
    OK(0, "ok"),
    NOT_EFOUND(10001, "未找到结果"),
    PROJECT_NOT_FOUND(10002, "工程不存在"),
    USER_NOT_FOUND(10003, "用户不存在"),
    PASSWOED_ERROR(20001, "用户名或密码错误"),
    PHONE_NUMBER_EXISTED(20002, "此号码已注册"),
    PHONE_NUMBER_NOT_EXISTED(20003, "号码未注册"),
    LOGIN_ERROR(20004, "未登陆或登陆失效，请重新登陆"),
    UNAUTHORIZED(30003, "没有权限"),
    LOG_EXISTED(40001,"记录已存在"),
    NAME_EXISTED(40002, "此名称已存在"),
    SERVER_ERROR(50000, "服务器错误");

    private int code;
    private String msg;

    private Code(int code, String error) {
        this.code = code;
        this.msg = error;
    }

    public int getCode(){
        return this.code;
    }

    public String getMsg(){
        return this.msg;
    }

}
